﻿<%@ Page Title="Details" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Details.aspx.cs" Inherits="Details" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        #b
    {
        height: 161px;
    }
    #a
    {
        height: 1862px;
    }
    #b0
    {
        height: 170px;
    }
    #b1
    {
        height: 224px;
    }
        #b0
    {
        height: 161px;
    }
    #a0
    {
        height: 1128px;
    }
    </style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Details
    </h2>
    <div  id="a">
       
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
       
        <br />
        <br />
        <br />
       
        <asp:Panel ID="Panel1" runat="server" Height="379px">
            <asp:RadioButtonList ID="RadioButtonList2" runat="server" AutoPostBack="True" 
                CausesValidation="True" 
                onselectedindexchanged="RadioButtonList2_SelectedIndexChanged">
                <asp:ListItem Selected="True" Value="percent">Percentage (%)</asp:ListItem>
                <asp:ListItem Value="bedrag">Kortingsbedrag</asp:ListItem>
                <asp:ListItem Value="vast">Vaste prijs</asp:ListItem>
            </asp:RadioButtonList>
            <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
            <asp:Label ID="LabelEenheid" runat="server" Text="%"></asp:Label>
            <br />
            <br />
            <br />
            Korting is van toepassing op :&nbsp;
            <asp:DropDownList ID="DropDownListVanToepassingOp" runat="server" AutoPostBack="True" 
                CausesValidation="True" Width="319px" 
                onselectedindexchanged="DropDownListVanToepassingOp_SelectedIndexChanged" 
                DataSourceID="SqlDataSourceNiveaus" DataTextField="niveau" DataValueField="niveau" 
                >
            </asp:DropDownList>
            <asp:SqlDataSource ID="SqlDataSourceNiveaus" runat="server" 
                ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                SelectCommand="SELECT [niveau] FROM [KortingNiveaus]">
            </asp:SqlDataSource>
            &nbsp;
            <br />
            <asp:Panel ID="PanelProductkorting" runat="server" Visible="False">
                <asp:DropDownList ID="DropDownListCategoryKorting" runat="server" AutoPostBack="True" 
                    CausesValidation="True" Height="36px" 
                    onselectedindexchanged="DropDownListCategory_SelectedIndexChanged" 
                    Width="206px">
                </asp:DropDownList>
                <asp:DropDownList ID="DropDownListMerkenKorting" runat="server" AutoPostBack="True" 
                    Height="36px" Width="205px">
                </asp:DropDownList>
                <asp:DropDownList ID="DropDownListEigenschappenKorting" runat="server" 
                    AutoPostBack="True" CausesValidation="True" 
                    onselectedindexchanged="DropDownListEigenschappen_SelectedIndexChanged">
                    <asp:ListItem>--</asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="DropDownListProductenKorting" runat="server" 
                    AutoPostBack="True" CausesValidation="True" 
                    onselectedindexchanged="DropDownListProducten_SelectedIndexChanged">
                    <asp:ListItem>--</asp:ListItem>
                </asp:DropDownList>
            </asp:Panel>
            <br />
            <br />
            <asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="True" 
                CausesValidation="True"  
                Text="Gratis product" />
            &nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="+" 
                Width="86px" />
            <br />
            &nbsp;
            <br />
            <asp:DropDownList ID="DropDownList26" runat="server" 
                DataSourceID="SqlDataSourceAlleProducten" DataTextField="naam" 
                DataValueField="artikelNr" Height="32px" Width="267px">
                <asp:ListItem>Selecteer product</asp:ListItem>
                <asp:ListItem>Samsung SF77</asp:ListItem>
                <asp:ListItem>Nokia 2334</asp:ListItem>
                <asp:ListItem>Goedkoopste product uit winkelmand</asp:ListItem>
            </asp:DropDownList>
            &nbsp;&nbsp;&nbsp;
            <asp:DropDownList ID="DropDownList30" runat="server" Height="32px" 
                 Visible="False" 
                Width="267px" DataSourceID="SqlDataSourceAlleProducten" 
                DataTextField="naam" DataValueField="artikelNr">
                <asp:ListItem>Selecteer product</asp:ListItem>
                <asp:ListItem>Samsung SF77</asp:ListItem>
                <asp:ListItem>Nokia 2334</asp:ListItem>
            </asp:DropDownList>
            &nbsp;
            <asp:DropDownList ID="DropDownList29" runat="server" 
                DataSourceID="SqlDataSourceAlleProducten" DataTextField="naam" 
                DataValueField="artikelNr" Height="32px" Visible="False" Width="267px">
                <asp:ListItem>Selecteer product</asp:ListItem>
                <asp:ListItem>Samsung SF77</asp:ListItem>
                <asp:ListItem>Nokia 2334</asp:ListItem>
            </asp:DropDownList>
            <br />
            <br />
            <hr />
            <br />
            <h2>
                Voorwaarden
            </h2>
            <div>
                <asp:Button ID="Button3" runat="server" onclick="ButtonAdd_Click" 
                    Text="Voorwaarde toevoegen" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button2" runat="server" onclick="ButtonVerwijder_Click" 
                    Text="Laatste voorwaarde verwijderen" />
                <br />
                <asp:Panel ID="PanelVoorwaarde" runat="server" Height="63px" Visible="False">
                    <br />
                    <asp:DropDownList ID="DropDownListVanToepassingOp0" runat="server" 
                        AutoPostBack="True" CausesValidation="True" 
                        onselectedindexchanged="DropDownList1_SelectedIndexChanged">
                        <asp:ListItem Selected="True">Selecteer keuze</asp:ListItem>
                        <asp:ListItem Value="product">Winkelkar bevat</asp:ListItem>
                        <asp:ListItem Value="betaal">Betaalmethode</asp:ListItem>
                        <asp:ListItem Value="verzend">Verzendformule</asp:ListItem>
                    </asp:DropDownList>
                </asp:Panel>
                <asp:Panel ID="PanelProduct" runat="server" Height="84px" Visible="False">
                    <asp:DropDownList ID="DropDownList14" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="DropDownList14_SelectedIndexChanged">
                        <asp:ListItem>Aantal stuks</asp:ListItem>
                        <asp:ListItem>Bedrag</asp:ListItem>
                        <asp:ListItem Value="alle" Enabled="False">Korting op alle </asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;<asp:DropDownList ID="DropDownListAantal" runat="server" AutoPostBack="True" 
                        CausesValidation="True" >
                        <asp:ListItem>Exact</asp:ListItem>
                        <asp:ListItem>Minstens</asp:ListItem>
                        <asp:ListItem>Maximum</asp:ListItem>
                    </asp:DropDownList>
                    <asp:TextBox ID="TextBoxAantal" runat="server" Width="77px"></asp:TextBox>
                    &nbsp;<asp:DropDownList ID="DropDownListCategory" runat="server" AutoPostBack="True" 
                        CausesValidation="True" Height="36px" 
                        onselectedindexchanged="DropDownListCategory_SelectedIndexChanged" 
                        Width="206px">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownListMerken" runat="server" AutoPostBack="True" 
                        Height="36px" Width="205px">
                    </asp:DropDownList>
                    <br />
                    &nbsp;<br />&nbsp;<asp:DropDownList ID="DropDownListProducten" runat="server" 
                        AutoPostBack="True" CausesValidation="True" 
                        onselectedindexchanged="DropDownListProducten_SelectedIndexChanged">
                        <asp:ListItem>--</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownListEigenschappen" runat="server" 
                        AutoPostBack="True" CausesValidation="True" 
                        onselectedindexchanged="DropDownListEigenschappen_SelectedIndexChanged">
                        <asp:ListItem>--</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownListWaarde" runat="server" AutoPostBack="True" 
                        CausesValidation="True">
                        <asp:ListItem>--</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;</asp:Panel>
                <br />
                <asp:Panel ID="PanelBetaalmethode" runat="server" Height="38px" Visible="False">
                    <asp:DropDownList ID="DropDownListequal" runat="server">
                        <asp:ListItem>gelijk aan</asp:ListItem>
                        <asp:ListItem>niet gelijk aan</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownListpay" runat="server" >
                        <asp:ListItem>Selecteer betaalmethode</asp:ListItem>
                        <asp:ListItem>Cash</asp:ListItem>
                        <asp:ListItem>Bankcontact</asp:ListItem>
                        <asp:ListItem>Visa</asp:ListItem>
                    </asp:DropDownList>
                </asp:Panel>
                <asp:Panel ID="PanelVerzendFormule" runat="server" Visible="False" 
                    Height="158px">
                    &nbsp;<asp:DropDownList ID="DropDownListgelijkaan" runat="server">
                        <asp:ListItem>gelijk aan</asp:ListItem>
                        <asp:ListItem>niet gelijk aan</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownListverzendmodule" runat="server">
                        <asp:ListItem>Selecteer verzendformule</asp:ListItem>
                        <asp:ListItem>UPS</asp:ListItem>
                        <asp:ListItem>Afhaling</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;<br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                </asp:Panel>
                <asp:Panel ID="PanelVoorwaarde2" runat="server" Height="310px" Visible="False">
                    <br />
                    <br />
                    <br />
                    <br />
                    <asp:DropDownList ID="DropDownListVanToepassingOp1" runat="server" 
                        AutoPostBack="True" CausesValidation="True" 
                        onselectedindexchanged="DropDownListVanToepassingOp1_SelectedIndexChanged">
                        <asp:ListItem Selected="True">Selecteer keuze</asp:ListItem>
                        <asp:ListItem Value="product">Winkelkar bevat</asp:ListItem>
                        <asp:ListItem Value="betaal">Betaalmethode</asp:ListItem>
                        <asp:ListItem Value="verzend">Verzendformule</asp:ListItem>
                    </asp:DropDownList>
                    <br />
                    <br />
                    <asp:Panel ID="PanelVoorwaarden2" runat="server" Height="58px" Visible="False">
                        <br />
                        <asp:DropDownList ID="DropDownListequal0" runat="server">
                            <asp:ListItem>gelijk aan</asp:ListItem>
                            <asp:ListItem>niet gelijk aan</asp:ListItem>
                        </asp:DropDownList>
                        <asp:DropDownList ID="DropDownListpay0" runat="server" >
                            <asp:ListItem>Selecteer betaalmethode</asp:ListItem>
                            <asp:ListItem>Cash</asp:ListItem>
                            <asp:ListItem>Bankcontact</asp:ListItem>
                            <asp:ListItem>Visa</asp:ListItem>
                        </asp:DropDownList>
                        <br />
                        <br />
                        <asp:Panel ID="PanelVerzendFormule2" runat="server" Height="70px" 
                            Visible="False">
                            <br />
                            <asp:DropDownList ID="DropDownListgelijkaan0" runat="server">
                                <asp:ListItem>gelijk aan</asp:ListItem>
                                <asp:ListItem>niet gelijk aan</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="DropDownListverzendmodule0" runat="server">
                                <asp:ListItem>Selecteer verzendformule</asp:ListItem>
                                <asp:ListItem>UPS</asp:ListItem>
                                <asp:ListItem>Afhaling</asp:ListItem>
                            </asp:DropDownList>
                            &nbsp;<br />
                            <br />
                            <br />
                        </asp:Panel>
                    </asp:Panel>
                </asp:Panel>
                <br />
                <asp:Panel ID="Panel4" runat="server" Height="373px" Visible="False">
                    <div >
                        &nbsp;&nbsp;&nbsp;&nbsp;<br />
                        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                            SelectCommand="SELECT [merknaam], [idMerk] FROM [Merken]">
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                            SelectCommand="SELECT [artikelNr], [naam] FROM [Producten]">
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="SqlDataSourceAlleProducten" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                            SelectCommand="SELECT * FROM [Producten]"></asp:SqlDataSource>
                        <br />
                        <asp:SqlDataSource ID="SqlDataSourceProductenCategorie" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                            
                            SelectCommand="SELECT SpecificatieWaarden.waarde, Producten.* FROM Specificaties INNER JOIN ProductSpecificaties ON Specificaties.idSpecificatie = ProductSpecificaties.idSpecificatie INNER JOIN Producten ON ProductSpecificaties.idProduct = Producten.artikelNr INNER JOIN SpecificatieWaarden ON Specificaties.idSpecificatiewaarde = SpecificatieWaarden.idSpecificatieWaarde WHERE (Specificaties.idSpecificatie = @parameter1)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="DropDownListCategory" DefaultValue="" 
                                    Name="parameter1" PropertyName="SelectedValue" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <br />
                        <asp:SqlDataSource ID="SqlDataSourceProductenMerk" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                            SelectCommand="SELECT Producten.naam, Producten.artikelNr FROM Specificaties INNER JOIN ProductSpecificaties ON Specificaties.idSpecificatie = ProductSpecificaties.idSpecificatie INNER JOIN Producten ON ProductSpecificaties.idProduct = Producten.artikelNr WHERE (Specificaties.idSpecificatie = @parameter1)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="DropDownListCategory" DefaultValue="" 
                                    Name="parameter1" PropertyName="SelectedValue" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="SqlDataSourceCategorie" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                            
                            SelectCommand="SELECT SpecificatieWaarden.idSpecificatieWaarde, SpecificatieWaarden.waarde FROM Specificaties INNER JOIN SpecificatieWaarden ON Specificaties.idSpecificatiewaarde = SpecificatieWaarden.idSpecificatieWaarde WHERE (Specificaties.parent IS NULL)">
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="SqlDataSourceEigenschappen" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                            
                            SelectCommand="SELECT SpecificatieWaarden.waarde, SpecificatieWaarden.idSpecificatieWaarde FROM Producten INNER JOIN ProductSpecificaties ON Producten.artikelNr = ProductSpecificaties.idProduct INNER JOIN Specificaties ON ProductSpecificaties.idSpecificatie = Specificaties.idSpecificatie INNER JOIN SpecificatieWaarden ON Specificaties.idSpecificatiewaarde = SpecificatieWaarden.idSpecificatieWaarde WHERE (ProductSpecificaties.idProduct = @parameter1) AND (Specificaties.parent IS NOT NULL)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="DropDownListProducten" Name="parameter1" 
                                    PropertyName="SelectedValue" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="SqlDataSourceEigenschappen2" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                            SelectCommand="SELECT Specificaties.specificatie FROM Specificaties INNER JOIN ProductSpecificaties ON Specificaties.idSpecificatie = ProductSpecificaties.idSpecificatie INNER JOIN Producten ON ProductSpecificaties.idProduct = Producten.artikelNr WHERE (ProductSpecificaties.idProduct = @parameter1) AND (Specificaties.parent = @parameter2)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="DropDownListProducten" Name="parameter1" 
                                    PropertyName="SelectedValue" />
                                <asp:ControlParameter ControlID="DropDownListEigenschappen" Name="parameter2" 
                                    PropertyName="SelectedValue" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="SqlDataSourceMerken" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                            SelectCommand="SELECT * FROM [Merken]" 
                            ></asp:SqlDataSource>
                        <asp:SqlDataSource ID="SqlDataSourceAlleProducten0" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                            SelectCommand="SELECT * FROM [Producten]"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="SqlDataSourceAlleEigenschappen" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                            
                            SelectCommand="SELECT SpecificatieWaarden.waarde FROM Specificaties INNER JOIN SpecificatieWaarden ON Specificaties.idSpecificatiewaarde = SpecificatieWaarden.idSpecificatieWaarde WHERE (Specificaties.parent IS NOT NULL)">
                        </asp:SqlDataSource>
                    </div>
                </asp:Panel>
            </div>
        </asp:Panel>
        <br />
           
        <br />
   </div>
</asp:Content>
